<extend name="Public:common"/>

<block name="content">

    <div class="feeldesk-form pd0 feelcrm-form">

		<div class="form-nav">

            <ul>

                <li><a href="javascript:" class="form-tab active">{:L('ADD_CONTACT_RECORD')}</a></li>

				<notempty name="detailtype"><a href="javascript:history.go(-1);" class="feelcrm-cancleBtn fr mt5 mr30">{:L('CANCEL')}</a></notempty>

            </ul>

        </div>

        <div class="layui-tab-content form-content pb0 follow-tocreate">

			 <form action="{:U('customer/create_follow')}" class="layui-form" method="post" enctype="multipart/form-data">

                <div class="layui-tab-item layui-show ">

					 <div class="form-item">

						<div class="layui-form-item">

							<div class="layui-input-inline wd100">

								<textarea class="layui-textarea layui-hide" name="follow[content]" id="follow_content">{$followup.content}</textarea>

							</div>

						</div>

						<div class="layui-form-item">

							<div class="layui-input-inline" style="width:auto;">

								<input type="radio" id="selectCustomerInput" class="layui-input" name="follow[customer_id]" title="{:L('NO_CUSTOMER_SELECTED')}" checked value="" readonly />

								<div id="selectCustomer" class="feelcrm-commbtn" >{:L('SELECT_CUSTOMER')}</div>

							</div>

							<div class="layui-input-inline w200 hidden">

								<select name="follow[contacter_id]" id="ContacterList" lay-filter="ContacterList">

									<option value="">{:L('SELECT_CONTACT')}</option>


								</select>

							</div>

						</div>

						 <div class="layui-form-item">

							 <div class="layui-input-inline" style="width:auto;">

								 <input type="radio" id="selectClueInput" class="layui-input" name="follow[clue_id]" title="{:L('NO_CLUE_SELECTED')}" checked value="" readonly />

								 <div id="selectClue" class="feelcrm-commbtn" >{:L('SELECT_CLUE')}</div>

							 </div>

						 </div>

						 <!-- 附件上传 -->
						 <div class="layui-form-item relative">
							 
							 <div class="layui-input-inline">

								 <button type="button" class="layui-btn layui-btn-primary uploadFile" id="uploadFile"><i class="layui-icon"></i>{:L('UPLOAD_ATTACHMENTS')}</button>

								 <ul id="attachments" class="attach-item mt10"></ul>

							 </div>

						 </div>

						<div class="layui-form-item">

							<div class="layui-input-inline w200 mb10">

								<select name="follow[cmncate_id]" lay-filter="getCmncateReply">

									<option value="">{:L('COMMUNICATION_TYPE')}</option>

									<volist name="cmncate" id="vo">

										<option value="{$vo.cmncate_id}" <eq name="followup.cmncate_id" value="$vo['cmncate_id']">selected</eq>>{$vo.cmncate_name}</option>

									</volist>

								</select>

							</div>

							<div class="layui-input-inline w200 mb10 <empty name='reply'>hidden</empty>">

								<select name="follow[reply_id]" id="cmncate_reply" lay-filter="ReplyContent">

									<option value="">{:L('CUSTOM_REPLY')}</option>

									<volist name="reply" id="vo">

										<option value="{$vo.reply_id}" <eq name="followup.reply_id" value="$vo['reply_id']">selected</eq>>{$vo.reply_content}</option>

									</volist>

								</select>

							</div>

							<div class="layui-input-inline w200 mb10">

								 <input type='text' name="follow[nextcontacttime]" readonly class="layui-input cursor layui-form-time" <notempty name="followup.nextcontacttime">value="{$followup.nextcontacttime|date='Y-m-d H:i:s',###}"</notempty> id="form_contacttime" placeholder="{:L('NEXT_CONTACT_TIME')}" >

							</div>

							<div class="layui-input-inline w200 mb10 savefollow">

								<input type="checkbox" name="reply" lay-skin="primary" value="1">

								<span>{:L('SAVE_AS_FOLLOW-UP_TEMPLATE')}</span>

							</div>

							<div class="fr">

								<div class="layui-input-inline w100 right mr0 mb10">

									<a href="javascript:" class="layui-btn layui-btn-normal submitForm createfollow">{:L('ADD_RECORD')}</a>

								</div>

							</div>

						</div>


					 </div>

				</div>

			</form>

		</div>

    </div>

	<include file="Public:language" />

	<include file="Public/selectCustomer" />

	<include file="Public/selectClue" />

</block>
